# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=doas-sudo-shim
# Note: This should be always lower than pkgver of the real sudo!
pkgver=0.1.1
pkgrel=1
pkgdesc="A shim for the sudo command that utilizes doas"
url="https://github.com/jirutka/doas-sudo-shim"
arch="noarch"
license="ISC"
depends="cmd:doas"
makedepends="asciidoctor doas"
subpackages="$pkgname-doc"
source="https://github.com/jirutka/doas-sudo-shim/archive/v$pkgver/doas-sudo-shim-$pkgver.tar.gz
	help-alpine.patch
	"
options="!check"  # no tests provided

build() {
	make man
}

package() {
	depends="$depends !sudo"  # this must not be defined on top-level
	provides="sudo-virt"
	provider_priority=1

	make install DESTDIR="$pkgdir" PREFIX=/usr
}

sha512sums="
f97654e4328a5d632b35a80772ab385c461614c771aafe89440240e6e733ac9572db1b6669b7146a1db0463b70cd34f3f8693df3b2a7bd07912e6a3d6a15e8ae  doas-sudo-shim-0.1.1.tar.gz
86e2d7e7ac3bb855ce2677e2f86092facb6da2f8d4e6fc24149b9bf836590be17f340fba54b74fd24d280b79be6ed97d405f7ce2e972f2bb5d12cf6bfe0bc9f7  help-alpine.patch
"
